<?php




class ConfigurationController extends Controller {
    
    
    public function actionOrganization(){
        
        
        
        $Organization = new Organization();
        
        if (!empty($_POST)) {
			// SAVE
			if (!empty($_POST['Organization']['ID'])) {
				$Organization = Organization::model()->find();
			}
			
			$Organization->_attributes = $_POST['Organization'];
			$Organization->CREATED_DATE = new CDbExpression("NOW()");
			
			if ($Organization->save()) {
				$this->redirect(array('/Configuration/Organization'));
			}
		} else {
			// Find
			$org = Organization::model()->find();
			
			if ($org != null) {
				$Organization = $org;
			}
		}
        
        $this->render('/Configuration/Organization',array(
            'Organization'=>$Organization, 
 
        )); 
        
    }
    
    
    
    
    
    
}
